package com.tidc.api.fallback;

import com.tidc.api.test.Test;


import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @ClassNmae TestFallbaskFactory
 * @Description TODO 服务降级和熔断处理
 * @Author 14631
 **/
@Component
public class TestFallbaskFactory implements FallbackFactory<Test> {


	@Override
	public Test create(Throwable throwable) {
		return new Test() {
			@Override
			public String get(int id) {
				System.out.println("日志");
				return "fallback"+id+"/**********************";
			}
		};
	}
}
